﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DBUtilitySqlsever;

namespace PA3PC113
{
  public  class Mes
    {
      public DataTable SelectMes()
      {
          DataTable dt = new DataTable();
          string sql = "select * from CommonHeader where flag=0";
          try
          {
              dt = DbHelperSQL.QueryTable(sql.ToString());

          }
          catch (Exception ex)
          {
              throw ex;
          }
          return dt;
      }
      /// <summary>
      /// 
      /// </summary>
      /// <returns></returns>
      public int updateMes(string Nonumber)
      {

          int flag = 0;
          string sql = "update CommonHeader set flag=1 where Nonumber='" + Nonumber + "'";
          flag = DbHelperSQL.ExecuteSql(sql.ToString());
          return flag;
      }
    }
}
